package yingyong;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.function.Function;
import java.util.stream.Stream;

public class demo3 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list,"zhangsan,19", "lisi,21", "wangwu,25");
        Student[] arr =  list.stream()
                .map(Student::new)
                .toArray(Student[] :: new);

        System.out.println(Arrays.toString(arr));
    }
}
